package org.ehe.erp.domain.stock.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.mybatis.core.domain.BaseEntity2;
import org.ehe.erp.domain.finance.ErpAccount;
import org.ehe.erp.domain.stock.ErpStock;

import java.math.BigDecimal;

/**
 * @author :zhangnn
 * @className :ErpStockBo
 * @description: TODO
 * @date 2025-08-28 17:00:08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ErpStock.class, reverseConvertGenerate = false)
public class ErpStockBo extends BaseEntity2 {

    /**
     * 编号
     */
    @NotNull(message = "编号不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 产品编号
     */
    @NotNull(message = "产品编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long productId;

    /**
     * 仓库编号
     */
    @NotNull(message = "仓库编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long warehouseId;

    /**
     * 库存数量
     */
    @NotNull(message = "库存数量不能为空", groups = {AddGroup.class, EditGroup.class})
    @DecimalMin(value = "0", message = "库存数量不能小于0", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal count;

    /**
     * 创建部门
     */
    private Long createDept;

    // 查询参数
    /**
     * 产品名称（查询用）
     */
    private String productName;

    /**
     * 产品编码（查询用）
     */
    private String productCode;

    /**
     * 仓库名称（查询用）
     */
    private String warehouseName;

    /**
     * 最小库存数量（查询用）
     */
    private BigDecimal minCount;

    /**
     * 最大库存数量（查询用）
     */
    private BigDecimal maxCount;
}
